<template>
  <div>
    <h1>父组件:{{title}}</h1>
    <TestA :title="title"/>
    <TestB @e-child="acceptSon"/>

  </div>
</template>

<script>
import TestA from "./TestA.vue";
import TestB from "./TestB.vue";

export default {
  name: "stof",
  components: {
    TestA,TestB
  },
  data() {
    return {
      title:""
    };
  },
  methods: {
    acceptSon(res) {
      this.title = res
    }
  }
};
</script>
